<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:core="urn:be:fgov:ehealth:errors:core:v1" targetNamespace="urn:be:fgov:ehealth:errors:core:v1"
    elementFormDefault="unqualified" attributeFormDefault="unqualified" version="1.0">
    <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="../../external/XSD/xml.xsd" />
    <xs:complexType name="LocalisedStringType">
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute ref="xml:lang" use="optional" />
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="ErrorType">
        <xs:sequence>
            <xs:element name="Origin" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        The component/party that is at the cause of the error: consumer or provider, client or server.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="Code" type="xs:string" />
            <xs:element name="Message" type="core:LocalisedStringType" maxOccurs="unbounded" />
            <xs:element name="Retry" type="xs:boolean" minOccurs="0" />
            <xs:element name="Contact" type="xs:string" minOccurs="0" />
        </xs:sequence>
        <xs:attribute name="Id" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    Unique number identifying this message.
                    If present, the ticket that was created for the client's request, leading to this Error, should be placed here.
                    Then this id can be used to trace back the message from request to
                    response.
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
</xs:schema>
